<?php

declare(strict_types=1);

namespace app\api\controller;

use app\common\lib\easywechat\OfficialAccount;

class Official
{
    /**
     * 调起公众号网页授权
     */
    public function auth()
    {
        app(OfficialAccount::class)->auth();
    }

    /**
     * 获取公众号用户信息
     */
    public function userinfo()
    {
        app(OfficialAccount::class)->getUserInfo();
        return '<script>alert("授权成功")</script>';
    }
}
